The invention relates to an apparatus for use in a communication bus system and to a communication bus system. An example of a communication bus system is a USB (Universal Serial Bus) system, discussed for example in U.S. Pat. No. 5,784,581. The USB system provides for communication between a number of slave stations and a host station. The host and slave stations are connected to each other in a tree topology. The host is connected to a number of slave stations and/or a number of hub stations. The hub stations in turn may be connected to further slave stations or further hub stations and so on. Thus, each slave station is connected to the host station either directly or via a number of hub stations.
The host station has a number of slave connectors for connecting slave stations or hub stations. The slave stations each have a host connector for connection to the host station, either directly to a slave connector of the host station or indirectly via one or more hub stations. Each hub station has a host connector and one or more slave connectors. The host connector is for connecting the hub station to a slave connector of the host station either directly or via other hub stations. The slave connectors are for connection to the host connectors of slave stations or other hub stations.
The USB system allows for incorporation of new stations into the system when the system is already running normally (i.e. when it is no longer in an initialization phase). This occurs for example when a user physically connects the host port of a slave station or hub station on one hand to a slave port of a host station or hub station on the other hand. Incorporation also occurs when the user switches on the power to a slave station or hub station later than to other stations. Collectively this will be referred to as xe2x80x9cintroductionxe2x80x9d of a station into the system.
Upon introduction, the station to whose slave port the new station is connected will detect the presence of the new station. This is reported to the host station, which will then incorporate the station into the system, for example by assigning a unique identifier to it, entering it into tables etc. If the new station is a hub station, the host station will cause this hub station to sense signals on its slave connectors to determine whether any active stations are connected to the slave ports. If so, this is signaled to the host processor, which then also incorporates these stations into the system.
The host station controls all communication in the USB system. If the host station is switched off, or even completely absent, no communication is possible in the USB system. This has the disadvantage that slave stations cannot use the USB system in the absence of the host station.
U.S. Pat. No 5,784,581 teaches an apparatus that overcomes this problem. This apparatus is capable of operating both as a host station and as a slave station. The apparatus has both a slave connector and a host connector. As long as the apparatus is not introduced as a slave station into a USB system with its host connector, the apparatus operates as host station to a slave station or stations that are connected to the slave connector. Once the apparatus is incorporated into a USB system as a slave station, it stops operating as a host station. An example of such an apparatus is a video recorder that can communicate as a host station with a camera to record data from the camera under its own control, or function as a slave that records if instructed to do so by a host station. In the latter case, data from the camera passes to the host station from the camera and from the host station to the recorder. In this case the slave port of the apparatus is disabled.
When the apparatus according to U.S. Pat. No. 5,784,581 is connected to the host station, it stops functioning as a host immediately, so that it does not create interference in the communication between its former slaves and the new host station. The slave stations have to be able to report to the new host station within a relatively short time required by the USB protocol. This means that the operation of the apparatus will be interrupted abruptly upon introduction to the USB system of the new host.
It would be advantageous to provide for a bus communication system that can operate both before and after connection of a new host station without abrupt interruption of communication upon connection of the new host station.
It would also be advantageous to provide for an apparatus that can operate both as a host station and a slave station and that can switch between operation as a host station to its own slave station and as a slave station in its own time.
The apparatus according to the invention is described in Claim 1. The apparatus according to the invention allows the apparatus to be part of more than one independent USB-like communication bus system at the same time. When the apparatus is part of a USB-like communication bus system with a first host station, the apparatus may be introduced into an another USB-like bus communication bus system with another host station. The apparatus has the freedom to decide for at least one of its slave connectors to which host station it assigns that slave connector when the apparatus is introduced into the other USB-like communication bus system. When the slave connector is assigned to one communication bus system, the apparatus supplies the signals (including lack of signals) to the host of the other communication bus system that the apparatus normally generates in response to the absence of a connection to the slave connector.
Preferably the slave connector may be transferred from one communication bus system to a new communication bus system during continued operation of both communication bus systems. The apparatus reports this to the new communication bus system with the signals that the apparatus normally generates in response to connection of a new slave station to the slave connector.
Preferably, the apparatus contains its own host processor that can act as a host station to the slave stations connected directly or indirectly to the slave connector when no other host station is connected to the host connector of the apparatus.
There is a risk that a user will connect a slave connector of the apparatus to its host connector. This may degrade the communication bus system if the apparatus responds as if a different host station has been connected. For example, the apparatus may start waiting for initiatives from the new host that are not forthcoming, because the apparatus itself is the new host. Also signals from the apparatus may cause pseudo conflicts if the apparatus receives back these signals as if they come from a different host station. In the USB protocol the host station assigns an identification code to newly introduced slave stations using the USB enumeration process. When a slave connector is connected to the host connector, the apparatus will transmit a signal to assign an identification code to the slave connector and receive it back on its own host connector.
In principle, each time the apparatus receives a signal to set an identification code after transmitting this kind of signal itself, this may be due to a connection between a slave connector and the host connector. Preferably, the apparatus compares the identification code that it transmits as a host station with identification codes included in signals received simultaneously with the transmission or shortly after the transmission (within the maximum allowable transmission delay of the communication bus system). If the identification codes are equal, it is likely. that the slave connector has been connected to the host connector and in response the apparatus preferably disregards the connection to the slave connector. Of course there is a small possibility that the identification code received at the host connector originated from a different host station even in this case. To reduce the probability that this leads to problems, the apparatus preferably responds to equal identification codes by transmitting a signal assigning another identification code. The slave port is then disregard only if this identification code is also received back.